package io.renren.modules.monitor.controller;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.monitor.service.MonitorAlarmService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * //Add the class description
 *
 * @author lhb
 * @date 2023/6/13
 */

@RestController
@RequestMapping("alarm")
public class MonitorAlarmController {
    @Autowired
    private MonitorAlarmService alarmService;
    /**
     * 列表
     */
    @RequestMapping("/list")
    @RequiresPermissions("threshold:list")
    public R list(@RequestParam Map<String, Object> params) {
        PageUtils page = alarmService.queryPage(params);

        return R.ok().put("page", page);
    }
}
